#ifndef __INetService_H__
#define __INetService_H__

#include "NFINet.h"
#include "NFIHttpNet.h"
#include "NFComm/NFCore/NFSingleton.hpp"
#include "NFComm/NFPluginModule/NFIModule.h"

class INetService : public NFIModule
{
public:
	virtual NFINet* CreateClient(NET_RECEIVE_FUNCTOR handleRecieve, NET_EVENT_FUNCTOR handleEvent, const char* strIP, const unsigned short nPort) = 0;
	virtual NFINet* CreateServer(NET_RECEIVE_FUNCTOR handleRecieve, NET_EVENT_FUNCTOR handleEvent, const unsigned int nMaxClient, const unsigned short nPort, const int nCpuCount = 4) = 0;
    virtual NFIHttpNet* CreateHttpServer(HTTPNET_RECEIVE_FUNCTOR handleRecive, unsigned short nPort) = 0;
};

extern INetService *g_pNetService;

#endif // __INetService_H__